package com.ruoyi.hr.controller.hr;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.hr.domain.foreignKey.EcdCity;
import com.ruoyi.hr.service.foreignkey.EcdCityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * 城市
 */
@Controller
@RequestMapping("/ecdCity")
public class EcdCityController extends BaseController {

    @Autowired
    EcdCityService ecdCityService;
    /**
     * 配置权限时，选择区域公司，查出此区域公司下的项目
     * @return
     */
    @PostMapping("/getEcdCity")
    @ResponseBody
    public List<EcdCity> getEcdCity() {
        List<EcdCity> ecdCities = ecdCityService.findAll();
        return ecdCities;
    }
}
